#!/usr/bin/python3
import teacher 

class classroom:
    """A Classroom class"""
    def __init__(self, id , name):
        self._id = id
        self._name = name
        self._teachers = {}
        self._students = {}
    
    @property
    def id(self): return self._id

    @id.setter
    def id(self, id):
        self._id = id
    
    @property
    def name(self): return self._name

    @name.setter
    def name(self, name):
        self._name = name
    
    @property
    def teachers(self): return self._teachers
    
    @property
    def students(self): return self._students
    
    def add_teacher(self, newteacher):
        if(not self._teachers.get(newteacher._id)):
            self._teachers.__setitem__(newteacher._id, newteacher )
    
    def add_student(self, newstudent):
        if(not self._students.get(newstudent._id)):
            self._students.__setitem__(newstudent._id, newstudent ) 
    
    def __repr__(self): 
        return repr(self._id + "," + self._name)
        
        
def main():
 
    c = classroom("010", "a1")
    t = teacher.teacher('011', 'Jone', 'Babara')
    c.add_teacher(  t )
    print (c.get_teachers())

if __name__ == "__main__": main()        